import { createStore } from 'vuex'

// 创建一个新的 store 实例
const store = createStore({
  state () {
    return {
      readonly:false, /** 当前用户是否处于全局只读状态 */
      windowClient: {width:10, height:10},
      topBarHeight:0,
      bottomBarHeight:0,
    }
  },
  mutations: {
    windowSizeChanged (state:any, payload) {
      state.windowClient.width = payload.width;
      state.windowClient.height = payload.height;
    }
  }
})

export default store